
package com.example.springboot.service;

import com.example.springboot.entity.Applications;
import com.example.springboot.entity.interviews;
import com.example.springboot.mapper.InterviewMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class InterviewService {

    @Autowired
    private InterviewMapper interviewMapper;

    public List<interviews> getAllInterview() {
        return interviewMapper.getAllInterviews();
    }

    public interviews getInterviewById(Long id) {
        return interviewMapper.getInterviewById(id);
    }

    public interviews createInterview(interviews interview) {
        interviewMapper.createInterview(interview);
        return interview;
    }

    public interviews updateInterview(interviews interview) {
        interviewMapper.updateInterview(interview);
        return interview;
    }

    public void deleteInterview(Long id) {
        interviewMapper.deleteInterview(id);
    }

    public void batchDeleteInterviews(List<Long> ids) {
        interviewMapper.batchDeleteInterviews(ids);
    }

    public List<interviews> searchInterviews(String keyword) {
        return interviewMapper.searchInterviews(keyword);
    }

    public List<interviews> getInterDataAll() {
        return interviewMapper.getInterDataAll();
    }

    public Applications updateAPPInterview(Applications application) {
        interviewMapper.updateAPPInterview(application);
        return application;
    }
}